


use "${pathdata_robustness}/RobustnessExperiment1.dta", clear





*indicator = 1 if in story treatment
gen story = 0 
replace story = 1 if inlist(treatment, "n=1_context")

drop if condition_ == "noinfo"


preserve
	
	
	
	*only keep consistent stories
	keep if story_type == "consistent"
	
	eststo clear
	*Column (I): immediate effect (Y) story dummy (X)
	eststo reg1: areg effect story, absorb(prolific_pid) cluster(prolific_pid)
	estadd scalar x = _b[_cons]


	*Column (II): delayed effect (Y) story dummy (X)
	eststo reg2: areg effect_recall story, absorb(prolific_pid) cluster(prolific_pid)
	estadd scalar x = _b[_cons]
	
	
restore


preserve
	
	
	gen id= _n
	
	*Make the data long to have both immediate and delayed Belief Impact in one column
	reshape long effec, i(id) j(delay) string
	
	*only keep consistent stories

	*indicator = 1 if delayed Belief Impact
	gen delaydum = 0
	replace delaydum = 1 if delay =="t_recall"
	label variable delaydum "Delay"
	
	gen storyXdelay = 0
	replace storyXdelay = 1 if story == 1 & delaydum == 1

	rename effec effect_total

	*Column (III): Belief Impact delay and immediate pooled (Y) delay and story indicators (X)
	eststo reg3: areg effect_total story delaydum storyXdelay, absorb(prolific_pid) cluster(prolific_pid)
	estadd scalar x = _b[_cons]
	


restore


preserve 

	eststo reg4: reg correct_recall story , cluster(prolific_pid) r
	estadd scalar x = _b[_cons]

restore

	
	
	
	esttab reg1 reg2 reg3 reg4 using "${pathout_robustness}/tables/tableA1.tex", ///
		booktabs nonotes replace label nomtitles ///
		keep(story delaydum storyXdelay) order(story delaydum storyXdelay) coeflabels( story "Story" delaydum "Delay" storyXdelay "Story $/times$ Delay" _cons "Control Mean") ///
		se(2) b(a2) stats(x N r2, fmt(2 0 2) label("Control Mean" "Observations" "R^2")) star(* 0.10 ** 0.05 *** 0.01) ///
		prehead("{\begin{tabular}{l*{4}{c}}\toprule\toprule&\multicolumn{4}{c}{\textit{Dependent variable:}}//[.1cm] &\multicolumn{3}{c}{Belief Impact} &  \multicolumn{1}{c}{Combined Recall} // \cmidrule(lr){2-4} \cmidrule(lr){5-5} // \textit{Sample:} &\multicolumn{1}{c}{Immediate} &\multicolumn{1}{c}{Delay} &\multicolumn{1}{c}{Pooled} &\multicolumn{1}{c}{Consistent}//")

